import trans from "@/utils/translate";
export const status = new Map([
  ['model-transform', '模型转换中'],
  ['scheduling', '调度中'],
  ['running', '运行中'],
  ['stop', '已停止'],
  ['error', '失败'],
  ['terminating', '停止中'],
  ['model-transform-ok', '模型转换成功'],
  ['model-transform-failed', '模型转换失败'],
]);

export const RESART = new Map([
  ['always', [
    'deployOnline.edgeInference.add.restartAlways',
    'deployOnline.edgeInference.add.restartAlwaysTip',
  ]]
])

export function getStatus (key: string) {
  return status.get(key);
}

export interface inference {
  name: string;
  describe:	string;
  models:	object[]|string
  item : object
  envs:	object
  containerImage:	string;
  containerImageTag:	string;
  containerRunCmd:	string;
  containerRunParams:	string;
  containerPrivilegeMode?:	boolean;
  containerRestart:	string;
  containerNetwork:	string;
  containerPorts:	string;
  nodeIds: object[]|string;
  caller: string
  createdAt: number
  groupId: number
  id: number
  orgId: number
  serviceId: string;
  startTime: number
  status: string
  updatedAt: number;
  url: string;
  userId: number;
  userName: string
}
